import React, { useState } from 'react'

import './App.css'
import PortalDialog from './components/PortalDialog'

export default function App() {
    const [isShow, setIsShow] = useState(false)
    return (
        <div className="box">
            <div className="left">Left</div>
            <div className="right">
                <button onClick={() => {
                    setIsShow(true);
                }}>Open dialog</button>
                {isShow && <PortalDialog close={() => {
                    setIsShow(false);
                }}></PortalDialog>}
            </div>
        </div>
    )
}
